﻿using PHRClient.DoctorForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace PHRClient
{
    public partial class DoctorDashboard : Form
    {
        public DoctorDashboard()
        {
            InitializeComponent();            
            this.TopLevel = false;
            this.AutoScroll = true;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Dock = DockStyle.Fill;


            DoctorMainForm.DoctorContainer.Controls.Clear();
            DoctorMainForm.DoctorContainer.Controls.Add(this);
        }

        private void newPatientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                DoctorMainForm._mainForm.Show();
            }
            catch (Exception)
            {
                DoctorMainForm._mainForm = new MainForm();
                DoctorMainForm._mainForm.Show();
            }
        }

        private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DoctorMainForm._loginForm = new DoctorLogin();
            DoctorMainForm._loginForm.Show();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void patientDetailsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                DoctorMainForm._mainForm.Show();
            }
            catch (Exception)
            {
                DoctorMainForm._mainForm = new MainForm();
                DoctorMainForm._mainForm.Show();
            }
        }

        private void registerPatientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RegisterPatient registerPatient = new RegisterPatient();
            registerPatient.Show();
        }

    }
}